package cn.edu.scau.cmi.ema.dao;

import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import org.springframework.dao.DataAccessException;

import org.springframework.stereotype.Repository;

import org.springframework.transaction.annotation.Transactional;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.Session;


import cn.edu.scau.cmi.ema.domain.*;
import cn.edu.scau.cmi.ema.domain.base.CmiPagination;


import cn.edu.scau.cmi.ema.util.CmiSqlUtil;

@Repository("Event9zxlDAO")
@Transactional
public class Event9zxlDAOImpl extends AbstractJpaDao<Event9zxl> implements Event9zxlDAO {

	private final static Set<Class<?>> dataTypes = new HashSet<Class<?>>(
			Arrays.asList(new Class<?>[] { Event9zxl.class }));

	@PersistenceContext(unitName = "ema")
	private EntityManager entityManager;

	public Event9zxlDAOImpl() {
		super();
	}

	public EntityManager getEntityManager() {
		return entityManager;
	}

	public Set<Class<?>> getTypes() {
		return dataTypes;
	}

	@Transactional
	public Event9zxl findEvent9zxlById(Integer id) throws DataAccessException {

		return findEvent9zxlById(id, -1, -1);
	}

	@Transactional
	public Event9zxl findEvent9zxlById(Integer id, int startResult, int maxRows) throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zxlById", startResult, maxRows, id);
			return (Event9zxl) query.getSingleResult();
		} catch (NoResultException nre) {
			return null;
		}
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByNumber(String number) throws DataAccessException {

		return findEvent9zxlByNumber(number, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByNumber(String number, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByNumber", startResult, maxRows, number);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByNumberContaining(String number) throws DataAccessException {

		return findEvent9zxlByNumberContaining(number, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByNumberContaining(String number, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByNumberContaining", startResult, maxRows, number);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByFood(String food) throws DataAccessException {

		return findEvent9zxlByFood(food, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByFood(String food, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByFood", startResult, maxRows, food);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodContaining(String food) throws DataAccessException {

		return findEvent9zxlByFoodContaining(food, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodContaining(String food, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByFoodContaining", startResult, maxRows, food);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByName(String name) throws DataAccessException {

		return findEvent9zxlByName(name, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByName(String name, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByName", startResult, maxRows, name);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByNameContaining(String name) throws DataAccessException {

		return findEvent9zxlByNameContaining(name, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByNameContaining(String name, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByNameContaining", startResult, maxRows, name);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoveryear(String discoveryear) throws DataAccessException {

		return findEvent9zxlByDiscoveryear(discoveryear, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoveryear(String discoveryear, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoveryear", startResult, maxRows, discoveryear);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoveryearContaining(String discoveryear) throws DataAccessException {

		return findEvent9zxlByDiscoveryearContaining(discoveryear, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoveryearContaining(String discoveryear, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoveryearContaining", startResult, maxRows, discoveryear);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverymonth(String discoverymonth) throws DataAccessException {

		return findEvent9zxlByDiscoverymonth(discoverymonth, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverymonth(String discoverymonth, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoverymonth", startResult, maxRows, discoverymonth);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverymonthContaining(String discoverymonth) throws DataAccessException {

		return findEvent9zxlByDiscoverymonthContaining(discoverymonth, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverymonthContaining(String discoverymonth, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoverymonthContaining", startResult, maxRows, discoverymonth);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverydetailtime(String discoverydetailtime) throws DataAccessException {

		return findEvent9zxlByDiscoverydetailtime(discoverydetailtime, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverydetailtime(String discoverydetailtime, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoverydetailtime", startResult, maxRows, discoverydetailtime);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverydetailtimeContaining(String discoverydetailtime)
			throws DataAccessException {

		return findEvent9zxlByDiscoverydetailtimeContaining(discoverydetailtime, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverydetailtimeContaining(String discoverydetailtime, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoverydetailtimeContaining", startResult, maxRows,
				discoverydetailtime);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoveryprovince(String discoveryprovince) throws DataAccessException {

		return findEvent9zxlByDiscoveryprovince(discoveryprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoveryprovince(String discoveryprovince, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoveryprovince", startResult, maxRows, discoveryprovince);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoveryprovinceContaining(String discoveryprovince)
			throws DataAccessException {

		return findEvent9zxlByDiscoveryprovinceContaining(discoveryprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoveryprovinceContaining(String discoveryprovince, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoveryprovinceContaining", startResult, maxRows,
				discoveryprovince);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverydistrict(String discoverydistrict) throws DataAccessException {

		return findEvent9zxlByDiscoverydistrict(discoverydistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverydistrict(String discoverydistrict, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoverydistrict", startResult, maxRows, discoverydistrict);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverydistrictContaining(String discoverydistrict)
			throws DataAccessException {

		return findEvent9zxlByDiscoverydistrictContaining(discoverydistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverydistrictContaining(String discoverydistrict, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoverydistrictContaining", startResult, maxRows,
				discoverydistrict);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverycounty(String discoverycounty) throws DataAccessException {

		return findEvent9zxlByDiscoverycounty(discoverycounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverycounty(String discoverycounty, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoverycounty", startResult, maxRows, discoverycounty);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverycountyContaining(String discoverycounty) throws DataAccessException {

		return findEvent9zxlByDiscoverycountyContaining(discoverycounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDiscoverycountyContaining(String discoverycounty, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDiscoverycountyContaining", startResult, maxRows,
				discoverycounty);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourceprovince(String sourceprovince) throws DataAccessException {

		return findEvent9zxlBySourceprovince(sourceprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourceprovince(String sourceprovince, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlBySourceprovince", startResult, maxRows, sourceprovince);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourceprovinceContaining(String sourceprovince) throws DataAccessException {

		return findEvent9zxlBySourceprovinceContaining(sourceprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourceprovinceContaining(String sourceprovince, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlBySourceprovinceContaining", startResult, maxRows, sourceprovince);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourcedistrict(String sourcedistrict) throws DataAccessException {

		return findEvent9zxlBySourcedistrict(sourcedistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourcedistrict(String sourcedistrict, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlBySourcedistrict", startResult, maxRows, sourcedistrict);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourcedistrictContaining(String sourcedistrict) throws DataAccessException {

		return findEvent9zxlBySourcedistrictContaining(sourcedistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourcedistrictContaining(String sourcedistrict, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlBySourcedistrictContaining", startResult, maxRows, sourcedistrict);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourcecounty(String sourcecounty) throws DataAccessException {

		return findEvent9zxlBySourcecounty(sourcecounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourcecounty(String sourcecounty, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlBySourcecounty", startResult, maxRows, sourcecounty);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourcecountyContaining(String sourcecounty) throws DataAccessException {

		return findEvent9zxlBySourcecountyContaining(sourcecounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourcecountyContaining(String sourcecounty, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlBySourcecountyContaining", startResult, maxRows, sourcecounty);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlBySource(String source) throws DataAccessException {

		return findEvent9zxlBySource(source, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlBySource(String source, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlBySource", startResult, maxRows, source);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourceContaining(String source) throws DataAccessException {

		return findEvent9zxlBySourceContaining(source, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlBySourceContaining(String source, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlBySourceContaining", startResult, maxRows, source);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlBySubject(String subject) throws DataAccessException {

		return findEvent9zxlBySubject(subject, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlBySubject(String subject, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlBySubject", startResult, maxRows, subject);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlBySubjectContaining(String subject) throws DataAccessException {

		return findEvent9zxlBySubjectContaining(subject, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlBySubjectContaining(String subject, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlBySubjectContaining", startResult, maxRows, subject);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByProducer(String producer) throws DataAccessException {

		return findEvent9zxlByProducer(producer, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByProducer(String producer, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByProducer", startResult, maxRows, producer);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByProducerContaining(String producer) throws DataAccessException {

		return findEvent9zxlByProducerContaining(producer, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByProducerContaining(String producer, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByProducerContaining", startResult, maxRows, producer);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodsubtype(String foodsubtype) throws DataAccessException {

		return findEvent9zxlByFoodsubtype(foodsubtype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodsubtype(String foodsubtype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByFoodsubtype", startResult, maxRows, foodsubtype);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodsubtypeContaining(String foodsubtype) throws DataAccessException {

		return findEvent9zxlByFoodsubtypeContaining(foodsubtype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodsubtypeContaining(String foodsubtype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByFoodsubtypeContaining", startResult, maxRows, foodsubtype);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodmaintype(String foodmaintype) throws DataAccessException {

		return findEvent9zxlByFoodmaintype(foodmaintype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodmaintype(String foodmaintype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByFoodmaintype", startResult, maxRows, foodmaintype);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodmaintypeContaining(String foodmaintype) throws DataAccessException {

		return findEvent9zxlByFoodmaintypeContaining(foodmaintype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodmaintypeContaining(String foodmaintype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByFoodmaintypeContaining", startResult, maxRows, foodmaintype);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByAdultertype(String adultertype) throws DataAccessException {

		return findEvent9zxlByAdultertype(adultertype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByAdultertype(String adultertype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByAdultertype", startResult, maxRows, adultertype);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByAdultertypeContaining(String adultertype) throws DataAccessException {

		return findEvent9zxlByAdultertypeContaining(adultertype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByAdultertypeContaining(String adultertype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByAdultertypeContaining", startResult, maxRows, adultertype);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodbatchfiller(String foodbatchfiller) throws DataAccessException {

		return findEvent9zxlByFoodbatchfiller(foodbatchfiller, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodbatchfiller(String foodbatchfiller, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByFoodbatchfiller", startResult, maxRows, foodbatchfiller);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodbatchfillerContaining(String foodbatchfiller) throws DataAccessException {

		return findEvent9zxlByFoodbatchfillerContaining(foodbatchfiller, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByFoodbatchfillerContaining(String foodbatchfiller, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByFoodbatchfillerContaining", startResult, maxRows,
				foodbatchfiller);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByAdulterlink(String adulterlink) throws DataAccessException {

		return findEvent9zxlByAdulterlink(adulterlink, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByAdulterlink(String adulterlink, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByAdulterlink", startResult, maxRows, adulterlink);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByAdulterlinkContaining(String adulterlink) throws DataAccessException {

		return findEvent9zxlByAdulterlinkContaining(adulterlink, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByAdulterlinkContaining(String adulterlink, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByAdulterlinkContaining", startResult, maxRows, adulterlink);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDetectmethod(String detectmethod) throws DataAccessException {

		return findEvent9zxlByDetectmethod(detectmethod, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDetectmethod(String detectmethod, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDetectmethod", startResult, maxRows, detectmethod);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDetectmethodContaining(String detectmethod) throws DataAccessException {

		return findEvent9zxlByDetectmethodContaining(detectmethod, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDetectmethodContaining(String detectmethod, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDetectmethodContaining", startResult, maxRows, detectmethod);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDescription(String description) throws DataAccessException {

		return findEvent9zxlByDescription(description, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDescription(String description, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDescription", startResult, maxRows, description);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByDescriptionContaining(String description) throws DataAccessException {

		return findEvent9zxlByDescriptionContaining(description, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByDescriptionContaining(String description, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByDescriptionContaining", startResult, maxRows, description);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByEventpunish(String eventpunish) throws DataAccessException {

		return findEvent9zxlByEventpunish(eventpunish, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByEventpunish(String eventpunish, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByEventpunish", startResult, maxRows, eventpunish);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByEventpunishContaining(String eventpunish) throws DataAccessException {

		return findEvent9zxlByEventpunishContaining(eventpunish, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByEventpunishContaining(String eventpunish, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByEventpunishContaining", startResult, maxRows, eventpunish);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByEventhazard(String eventhazard) throws DataAccessException {

		return findEvent9zxlByEventhazard(eventhazard, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByEventhazard(String eventhazard, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByEventhazard", startResult, maxRows, eventhazard);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByEventhazardContaining(String eventhazard) throws DataAccessException {

		return findEvent9zxlByEventhazardContaining(eventhazard, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByEventhazardContaining(String eventhazard, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByEventhazardContaining", startResult, maxRows, eventhazard);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByImported(Boolean imported) throws DataAccessException {

		return findEvent9zxlByImported(imported, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByImported(Boolean imported, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByImported", startResult, maxRows, imported);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlByIslock(Boolean islock) throws DataAccessException {

		return findEvent9zxlByIslock(islock, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByIslock(Boolean islock, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zxlByIslock", startResult, maxRows, islock);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@Transactional
	public Event9zxl findEvent9zxlByPrimaryKey(Integer id) throws DataAccessException {
		return findEvent9zxlByPrimaryKey(id, -1, -1);
	}

	@Transactional
	public Event9zxl findEvent9zxlByPrimaryKey(Integer id, int startResult, int maxRows) throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zxlByPrimaryKey", startResult, maxRows, id);
			return (Event9zxl) query.getSingleResult();
		} catch (NoResultException nre) {
			return null;
		}
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlsByIds(Set<Integer> ids) throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zxlsByIds", -1, -1, ids);
			return new HashSet(query.getResultList());
		} catch (NoResultException nre) {
			return null;
		}
	}

	@Transactional
	public Set<Event9zxl> findAllEvent9zxls() throws DataAccessException {

		return findAllEvent9zxls(-1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findAllEvent9zxls(int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findAllEvent9zxls", startResult, maxRows);
		return new LinkedHashSet<Event9zxl>(query.getResultList());
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zxl> findEvent9zxlByCompositeProperities(String sql, int startResult, int maxRows) {
		return new LinkedHashSet<Event9zxl>(createQuery(sql, startResult, maxRows).getResultList());
	}

	@Transactional
	public Set<Event9zxl> findEvent9zxlsByDetachedCriteria(CmiPagination page) throws DataAccessException {
		DetachedCriteria detachedCriteria = CmiSqlUtil.createDetachedCriteria(page, Event9zxl.class);
		Session session = entityManager.unwrap(Session.class);
		Set<Event9zxl> event9zxls = new HashSet(detachedCriteria.getExecutableCriteria(session)
				.setFirstResult(page.getSearchBeginCursor()).setMaxResults(page.getPaginationSize()).list());

		return event9zxls;
	}

	@Transactional
	public Event9zxl findEvent9zxlByPhysicalPrimaryKey(String number) throws DataAccessException {
		return findEvent9zxlByPhysicalPrimaryKey(number, -1, -1);
	}

	@Transactional
	public Event9zxl findEvent9zxlByPhysicalPrimaryKey(String number, int startResult, int maxRows)
			throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zxlByPhyscialPrimaryKey", startResult, maxRows, number);
			return (Event9zxl) query.getSingleResult();
		} catch (NoResultException nre) {
			return null;
		}
	}

	public boolean canBeMerged(Event9zxl entity) {
		return true;
	}
}
